<?php
namespace app\admin\controller\store;
use think\Db;
class EwmLog extends \app\admin\controller\Common
{
    protected $type = 0;
    public function index(){
        return view();
    }

    public function list(){
        $limit = request()->param('limit') ?? 15;
        $page = request()->param('page');
        $page = $page ? ($page - 1) * $limit : 0;
        $search = request()->param();
        $query = (new \app\common\model\EwmLog());
        isset($search['title']) && $search['title'] != "" ? $query->where("title like '%{$search['title']}%'") : '';
        $query->order("id desc");
        $list = $query->limit($page, $limit)
                ->append(['state_text','addtime_text','goods_title_text','company_title_text','user_manage_title_text','user_manage_mobile_text'])
                ->select();
        $count = $query->count();
   
        return self::successResult('',$list,$count);
    }

   

  

 
}
